package cn.stylefeng.guns.czlm.service;

import cn.stylefeng.guns.core.common.page.LayuiPageFactory;
import cn.stylefeng.guns.czlm.entity.TbCoupon;
import cn.stylefeng.guns.czlm.entity.TbUserCoupon;
import cn.stylefeng.guns.czlm.mapper.TbCouponMapper;
import cn.stylefeng.guns.czlm.mapper.TbUserCouponMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TbUserCouponService {

    @Resource
    private TbUserCouponMapper tbUserCouponMapper;

    //查询拥有该优惠卷且未过期的用户
    public List<TbUserCoupon> selectUserCouponsByCouponId(int couponId){
        return this.tbUserCouponMapper.selectUserCouponsByCouponId(couponId);
    }
}
